<?php


class ElfinderHelper extends AppHelper {
  
  var $helpers = array('Html');
  
  
  function __construct($options = null) {
  
    parent::__construct($options);
    
     
  } ///////////// end constructor /////////////////
  
  /**
   *
   * @param bool $importInline 'true' means the CSS <link> and JS <script> imports will be output right 
   *                           where this method is called (usefull when calling it in a <head> section).
   *                           'false' means to output the CSS & JS imports not where this method is called,
   *                           but rather at the end of the HTML page, making the entire page load first (this
   *                           option useful when calling this method from within the <body> of the page).
   */
  function importElfinder($importInline = true) {
    
    //$options = array('inline'=>false);
    $options = array('inline'=>$importInline);
    // for Elfinder 
    
    // 'libs' dir inside 'webroot/js'
      
      // Don't need these jQuery UI imports now that I have my own jQuery UI's being imported for whole app
      //    echo $this->Html->script('libs/Elfinder1.2/js/jquery-ui-1.8.13.custom.min.js',$options);
      //    echo $this->Html->css("/js/libs/Elfinder1.2/css/smoothness/jquery-ui-1.8.13.custom.css",null,$options);
    
    //echo $this->Html->script('libs/Elfinder1.2/js/elfinder.min.js',$options);
    // TEMP: using the 'full' verison to test some edits
    //echo $this->Html->script('libs/Elfinder1.2/js/elfinder.full.js',$options);
    
    // This "mine" version has a couple minor tweaks I did
    echo $this->Html->script('libs/Elfinder1.2/js/elfinder.mine.min.js',$options);
    
    echo $this->Html->css("/js/libs/Elfinder1.2/css/elfinder.css",null,$options);
    
  } ///////////// end func //////////////////////
  

} //////////////////////// end class ////////////////////////////////

?>
